struct XPTable
(
	fn init =
	(
		dotNet.loadAssembly "XPTable.dll";

	),
	inits=init(),
	form1= dotNetObject "System.Windows.Forms.Form",
	---------------------------------------------------------------
	-- create an instance of a Table model, Column model, Table model
	---------------------------------------------------------------
	table1=dotNetObject "XPTable.Models.Table",	
	columnModel1 = dotNetObject "XPTable.Models.ColumnModel",
	tableModel1 = dotNetObject "XPTable.Models.TableModel",
	---------------------------------------------------------------
	-- Define some formating styles
	---------------------------------------------------------------
	dockStyle = dotNetClass "System.Windows.Forms.DockStyle",
	formBorderStyle = dotNetClass "System.Windows.Forms.FormBorderStyle",
	colors = dotNetClass "System.Drawing.Color",
	gridColor = dotNetClass " XPTable.Models.GridLines",
	fn initTable table=
	(
		table.ColumnModel = columnModel1
		table.TableModel = tableModel1
	),
	initTables=initTable table1,
	 ---------------------------------------------------------------
	-- create an array with each type that will be cancatinated with the xpTableModelText variable
	---------------------------------------------------------------
	xpTableModelText = ("dotNetObject \"XPTable.Models."),
	columnArray=#(#("Text","Text",50)),
-- 	columnModels = #("Text","Button","CheckBox","Image","Number","ProgressBar","ComboBox","DateTime","Color"),
-- 	columnWidth = #(70, 65, 90, 24, 50, 100, 80, 130, 110),


	fn showForm=
	(
		form1.topmost=true
		form1.Controls.Add table1
		form1.show()
	),
	fn setTable=
	(
		---------------------------------------------------------------
		-- set some Table specific properties
		---------------------------------------------------------------
		table1.Dock = dockStyle.Fill;
		table1.FullRowSelect = false;	
		table1.BorderColor = colors.Black;
		table1.UnfocusedBorderColor = colors.Black;
		table1.SortedColumnBackColor = colors.DarkGray;
		table1.BackColor = colors.LightGray;
		table1.GridColor = colors.Silver;
		table1.GridLines = gridColor.Both;
		table1.TableModel.RowHeight += 5;
	)
)
table=XPTable()
table.setTable()
-- form2= dotNetObject "System.Windows.Forms.Form"
-- form2.topmost=true
-- form2.Width = 830;
-- form2.Height = 250;
-- form2.Controls.Add table.table1;
-- form2.Show()
table.showForm()